package com.tbit.uqbike.client.ordertrace;

import com.tbit.uqbike.client.ordertrace.Event;
import com.tbit.uqbike.client.ordertrace.InvalidTransitionException;
import com.tbit.uqbike.client.ordertrace.OrderStage;

/**
 * 状态转移组件
 *
 *
 * @author <a href="mailto:chen.chaoxiong@tbit.com.cn">ChenChaoXiong</a>
 * @since 2024/7/17
 */
public interface StateTransitionComponent {
//    boolean isValidTransition(OrderStage currentStage, Event event);
    OrderStage getNextStage(OrderStage currentStage, Event event) throws InvalidTransitionException;

    boolean accept(OrderStage currentStage, Event event);
}
